<?php /* Smarty version 2.6.16, created on 2012-01-05 12:18:32
         compiled from game_manager.tpl */ ?>
<?php if ($this->_tpl_vars['IsProcess'] != 'Y'): ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "top.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php echo '  
<script type="text/javascript">

var j = jQuery.noConflict();
j(document).ready(function(){

//if(j(#applicable_for).html()=="" )
//alert("100");

});

function set_category(x)
{
	//alert(x.options[x.options.selectedIndex].value);
	//alert(x.name.charAt(x.name.length-1));
	var b = x.name.charAt(x.name.length-1);
	document.getElementById("go_btn_"+b).href=x.options[x.options.selectedIndex].value;
	
	j.ajax({
   type: "POST",
   url: "applied_for.php",
   data: "id="+b+"&cat="+x.options[x.options.selectedIndex].text.toLowerCase(),
   dataType:"text",
   success: function(msg){
     msg = msg.replace(\'\\n\',\'\');
     msg = msg.replace(\'\\r\\n\',\'\');
	 msg = msg.trim(msg);
	 if(msg=="R")
	{
		msg="Replays";
	 	j("#applicable_for_"+b).text(msg);
	 }
	 if(msg=="C")
	{
		msg="Coach";
	 	j("#applicable_for_"+b).text(msg);
	 }
	 if(msg=="B")
	{
		msg="Both";
	 	j("#applicable_for_"+b).text(msg);
	 }
	 
   }
 });
 
}


</script>
'; ?>

<h2> Games <div id="TransMsgDisplay" align="right" style="height:3px" ></div></h2>
<?php endif; ?>

<div id="records_listing">	
<?php if ($this->_tpl_vars['MessgReportText'] != ""): ?><div align="left" class="successful2" style="color:#FF0000; margin:-25px 0 0 0;"><?php echo $this->_tpl_vars['MessgReportText']; ?>
</div><?php endif; ?>
				
<div class="newsName">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td colspan="7" align="left" valign="top">
				<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#9f9f9f">
				  <tr  bgcolor="#9f9f9f">
					<td  align="left" width="30%" valign="middle" class="padleft">
						<a href="#"  onClick="ManagerGeneral('<?php echo $this->_tpl_vars['page_name']; ?>
?action=list_order&do_order=GO&OrderByID=1&OrderType=<?php echo $this->_tpl_vars['OrderType']; ?>
&<?php echo $this->_tpl_vars['SearchLink']; ?>
&from=<?php echo $this->_tpl_vars['from']; ?>
')" >								
							<span class="whitetext"><strong>Game</strong></span>									
							<?php echo $this->_tpl_vars['ReturnSortingArr']['DisplaySortingImage'][1]; ?>
				
						</a>	
					</td>
					<td width="30%" class="whitetext" align="center" valign="middle"><strong>Category</strong></td>
					
				
					
					<td width="7%" align="center" class="whitetext" valign="middle"><strong>Active</strong></td>	
					<td width="7%" align="center" class="whitetext" valign="middle"><strong>Default</strong></td>						
					<td width="15%" align="center" class="whitetext" valign="middle"><strong>Actions</strong></td>
				  </tr>
				</table>
			</td>
		</tr>
		 
		<tr>
			<td colspan="7" align="left" valign="top">
				<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#878787">
				<?php if ($this->_tpl_vars['NumSelectCms'] > 0): ?>
			<?php unset($this->_sections['RowCms']);
$this->_sections['RowCms']['name'] = 'RowCms';
$this->_sections['RowCms']['loop'] = is_array($_loop=$this->_tpl_vars['SelectCmsArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['RowCms']['show'] = true;
$this->_sections['RowCms']['max'] = $this->_sections['RowCms']['loop'];
$this->_sections['RowCms']['step'] = 1;
$this->_sections['RowCms']['start'] = $this->_sections['RowCms']['step'] > 0 ? 0 : $this->_sections['RowCms']['loop']-1;
if ($this->_sections['RowCms']['show']) {
    $this->_sections['RowCms']['total'] = $this->_sections['RowCms']['loop'];
    if ($this->_sections['RowCms']['total'] == 0)
        $this->_sections['RowCms']['show'] = false;
} else
    $this->_sections['RowCms']['total'] = 0;
if ($this->_sections['RowCms']['show']):

            for ($this->_sections['RowCms']['index'] = $this->_sections['RowCms']['start'], $this->_sections['RowCms']['iteration'] = 1;
                 $this->_sections['RowCms']['iteration'] <= $this->_sections['RowCms']['total'];
                 $this->_sections['RowCms']['index'] += $this->_sections['RowCms']['step'], $this->_sections['RowCms']['iteration']++):
$this->_sections['RowCms']['rownum'] = $this->_sections['RowCms']['iteration'];
$this->_sections['RowCms']['index_prev'] = $this->_sections['RowCms']['index'] - $this->_sections['RowCms']['step'];
$this->_sections['RowCms']['index_next'] = $this->_sections['RowCms']['index'] + $this->_sections['RowCms']['step'];
$this->_sections['RowCms']['first']      = ($this->_sections['RowCms']['iteration'] == 1);
$this->_sections['RowCms']['last']       = ($this->_sections['RowCms']['iteration'] == $this->_sections['RowCms']['total']);
?>
			
				  <tr <?php if (( $this->_tpl_vars['templatelite']['section']['RowCms']['index'] % 2 ) == 0): ?> bgcolor="#ffffff" <?php else: ?> bgcolor="#ffffff" <?php endif; ?>>
					<td  align="left" width="30%" valign="middle" class="simpletxt">
					<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_name']; ?>

					</td>
					
					<!-- modified -->
					<td width="15%" align="center" valign="middle">
					<select name="category_<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
" id="category_<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
"  onchange="set_category(this)">
					<option value="">Select Category</option>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_ladder'] == 'Y'): ?>
					<option value="ladder_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Ladder</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_race'] == 'Y'): ?>
					<option value="race_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Race</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_server'] == 'Y'): ?>
					<option value="server_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Server</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_region'] == 'Y'): ?>
					<option value="region_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Region</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_rating'] == 'Y'): ?>
					<option value="rating_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Rating</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_versus'] == 'Y'): ?>
					<option value="versus_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Versus</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_team'] == 'Y'): ?>
					<option value="team_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Team</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_type'] == 'Y'): ?>
					<option value="type_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Type</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_champion'] == 'Y'): ?>
					<option value="champion_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Champion</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_map'] == 'Y'): ?>
					<option value="map_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Map</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_mode'] == 'Y'): ?>
					<option value="mode_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Mode</option>
					<?php endif; ?>
					<?php if ($this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['is_class'] == 'Y'): ?>
					<option value="class_manager.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">Class</option>
					<?php endif; ?>
					</select>
					</td>
					
					<td width="10%" align="center">
					<div id="applicable_for_<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
"></div>
					</td>
					<td width="5%" align="center">
					<a id="go_btn_<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
" href="#"><img src="./images/gobttn.gif" height="20" width="20" /></a>
					</td>
					
	
					<td width="7%" height="28" align="center" valign="middle"><a href="#" onClick="ManagerGeneral('<?php echo $this->_tpl_vars['page_name']; ?>
?action=activate&<?php echo $this->_tpl_vars['PreserveLink']; ?>
&record_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
')">
					<img src="images/<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['active_img']; ?>
" width="15" height="14" border="0" alt="<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['active_alt']; ?>
" /></a></td>
					<td width="7%" height="28" align="center" valign="middle"><a href="#" onClick="ManagerGeneral('<?php echo $this->_tpl_vars['page_name']; ?>
?action=default&<?php echo $this->_tpl_vars['PreserveLink']; ?>
&record_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
')">
					<img src="images/<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['default_img']; ?>
" width="15" height="14" border="0" alt="<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['default_alt']; ?>
" /></a></td>
					<td width="15%" align="center" valign="middle">
					  <table width="100%" border="0" cellspacing="0" cellpadding="0">
						  <tr>
						  <td width="50%" height="32" align="center" valign="middle" class="rightBorder" >
						  <a href="game_update.php?game_id=<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
">
						  <img src="images/edit_dark.gif" alt="" width="15" height="14" border="0" />
						  </a>
						  </td>
						  
						  <td width="50%" align="center" valign="middle">
						  <a href="#" onClick="ConfirmDelete('<?php echo $this->_tpl_vars['page_name']; ?>
?action=del&<?php echo $this->_tpl_vars['PreserveLink']; ?>
','<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_id']; ?>
','<?php echo $this->_tpl_vars['SelectCmsArr'][$this->_sections['RowCms']['index']]['game_name_delete']; ?>
','Language:: ')">
						  <img src ="images/delete_icon.gif" border="0" alt="" />
						  </a >
						  </td >
						  </tr >
					</table>					
					</td >
				 </tr>
				  <?php endfor; endif; ?>
			<?php else: ?>
				<tr bgcolor="#f4f4f5"><td class="plaintxt" colspan="5" align="center">No Record Found</td></tr>
			<?php endif; ?>       
				  
				 
			  </table>
			</td >
		  </tr >
		  
  </table >
</div>
<br />
<div>	<?php if ($this->_tpl_vars['pagination_arr'][3] > 0): ?>
   <table>
	  <tr>
        <td height="30" valign="middle" align="center">
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<td align="left" class="plaintxt">					
					<?php if ($this->_tpl_vars['pagination_arr'][2] != ""): ?>					
						<?php echo $this->_tpl_vars['pagination_arr'][2]; ?>

					<?php endif; ?>					
					</td>
					<td align="right" class="plaintxt">					   	
					<?php if ($this->_tpl_vars['pagination_arr'][1] != ""): ?>					
						<?php echo $this->_tpl_vars['pagination_arr'][1]; ?>

					<?php endif; ?>					
					</td>
				</tr>
			</table>
		</td>
      </tr>
	  </table>
	<?php endif; ?> </div>
</div>

<?php if ($this->_tpl_vars['IsProcess'] != 'Y'): ?>  	
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "bottom.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php endif; ?>